package com.spsm.netlab.blocks;

import com.spsm.netlab.NetLab;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class circuitAssembler extends Block{

	
	@SideOnly(Side.CLIENT)
	protected IIcon blockIcon;
	protected IIcon blockIconTop;
	protected IIcon blockIconBottom;
	
	
	
	public circuitAssembler() {
		super(Material.iron);
		this.setCreativeTab(NetLab.netLabTab);
	}
	
	@SideOnly(Side.CLIENT)
	@Override
	public void registerBlockIcons(IIconRegister p_149651_1_)
	{
	blockIcon = p_149651_1_.registerIcon(NetLab.MODID + ":" + this.getUnlocalizedName().substring(5));
	
	blockIconTop = p_149651_1_.registerIcon(NetLab.MODID + ":" + this.getUnlocalizedName().substring(5) + "Top");
	
	blockIconBottom = p_149651_1_.registerIcon(NetLab.MODID + ":" + this.getUnlocalizedName().substring(5) + "Bottom");
	
	}
	
	@SideOnly(Side.CLIENT)
	@Override
	public IIcon getIcon(int side, int metadata)
	{
        if (side == 1) {
            return blockIconTop;
    }else if (side == 0) {
    	return blockIconBottom;
    }
        else {
            return blockIcon;
    }

	}
}
